package com.portal.admin.utils.weixni;

import com.portal.admin.base.constant.WxAppConst;
import com.portal.admin.base.enums.SystemType;
import com.portal.admin.utils.http.HttpClientUtils;
import com.portal.admin.utils.session.SessionUtils;
import net.sf.json.JSONObject;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.http.HttpServletRequest;

import static com.portal.admin.config.service.SysConfigService.getSysConfig;

/**
 * 小程序工具类
 */
public class AdminApiUtils {

    public static JSONObject getJscode2session(String code){
        HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
        JSONObject result = new JSONObject();
        String sessionId = request.getSession().getId();
        result.put("unionid", "suifeng");
        result.put("openid", sessionId);
        return result;
    }



}
